//
//  CLIsStringNil.m
//  IntegralMall
//
//  Created by 朱跃龙 on 2017/9/26.
//  Copyright © 2017年 朱跃龙. All rights reserved.
//

#import "CLIsStringNil.h"

@implementation CLIsStringNil

+ (BOOL)isStringNil:(NSString *)str{
    
    if (![str isKindOfClass:[NSNull class]]) {
        
        if (str && ![str isEqualToString:@""]) {
            
            return YES;
            
        }
        
    }
    
    
    return NO;
    
}

+ (BOOL)isStringNil:(NSString *)str With:(NSString *)string{
    
    if (str && ![str isEqualToString:@""] && [str isEqualToString:string]) {
        
        return YES;
        
    }
    
    return NO;
    
}

+ (BOOL)isString:(NSString *)str With:(NSString *)string{
    
    if ([str isEqualToString:string]) {
        
        return YES;
        
    }
    
    return NO;
    
}

+ (NSString *)isString:(NSString *)str{
    
    if ([str isEqualToString:@""] || str == nil) {
        
        str = @" ";
        
    }
    
    return str;
    
}

@end
